package com.imooc.beanannotation.javabased;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.Scope;

@Configuration
@ImportResource("classpath:config.xml")
public class StoreConfig {
	
//	@Bean(name="store",initMethod="",destroyMethod="")
//	public Store stringStore(){
//		return new StringStore();
//	}
//	
	
	@Bean(name="stringStore",initMethod="init",destroyMethod="destroy")
	@Scope(value="property")
	public Store stringStore(){
		return new StringStore();
	}
	
	
	
	
	
}
